package com.chunuo.eduservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chunuo.eduservice.entity.EduComment;
import com.chunuo.eduservice.mapper.EduCommentMapper;
import com.chunuo.eduservice.service.EduCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 评论 服务实现类
 * </p>
 *
 * @author testjava
 * @since 2020-07-04
 */
@Service
public class EduCommentServiceImpl extends ServiceImpl<EduCommentMapper, EduComment> implements EduCommentService {

    /**
     * 查询课程的评论信息
     * @param courseId
     * @return
     */
    @Override
    public List<EduComment> getCourseComment(String courseId) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("course_id",courseId);
        return baseMapper.selectList(wrapper);
    }
}
